1. Field of the Invention
The present invention generally relates to a resume processing control system for use in a computer system, and more particularly, to a method for saving the status of a computer system operating under the OS/2 operating system in response to a power-off signal, removing power from the computer system, and subsequently re-applying power to the computer system so that the computer system returns to its original state.
2. Description of the Prior Art
In a conventional computer system, such as an "IBM compatible" microcomputer based upon an 80.times.86 microprocessor or equivalent, the contents of registers and memory locations associated with the underlying microprocessor are generally lost when the power is removed from the system. Thereafter, when power is restored to the computer system, the system executes initialization steps to place the system in an initial state. In this case, any computer program and accompanying data existing within the system before the power was removed must be re-loaded.
In recent years, "resume" functionality has been added to certain computer systems--most notably the Toshiba line of laptop microcomputers--to allow the computer system to save its operating conditions before power is removed, and to resume processing at the same point when power is subsequently restored. This functionality is accomplished by maintaining a supply of power to the computer's low-power dynamic memory while removing such power to the devices requiring a larger amount of power, such as the display and the disk drives. This power consumption preservation functionality allows computer systems which posses only a limited power supply, such as battery operated laptop computers, to maintain the current state of the computer system while minimizing the amount of necessary power consumption.
For example, the built-in resume feature found on the Toshiba line of laptop computers (referred to as AutoResume.TM. on these machines) allows the user to power off the computer (thus saving battery power) without losing data. This functionality is built into the Basic Input/Output System (BIOS) routines found within the computer's read-only memory (ROM). The resume function is accomplished by saving all necessary register information into random access memory (RAM) and retaining power to that memory while disabling power to the other computer devices. When normal power is restored, the saved information is returned to the registers and the machine is returned to its previous state.
This feature is useful if the user intentionally shuts down the machine to preserve battery life, but an added benefit occurs when the battery power reaches a critically low level. At this point, the machine will warn the user (e.g. by beeping) that the batteries are near depletion. If the user fails to shut down the machine within a given amount of time (approximately five minutes), the computer will automatically go into "resume mode" and shut itself off. When normal power is re-applied, the BIOS will restore the computer to its original state with no loss of data and without any interruption in execution of the previously running program.
Unfortunately, the resume processing BIOS code presently built into such laptops supports the resume function under the MS-DOS operating system only. When run under a different operating system, such as OS/2 which is a multi-tasking operating system available from Microsoft Corporation of Redmond, Wash., the present BIOS resume function does not properly save certain registers and other data used by OS/2, and the resume function operation thereby fails. This is due, in part, to the fact that the OS/2 operating system was designed to operate on a computer system utilizing a multi-mode 80286 microprocessor or a microprocessor downwardly compatible with the 80286, such as the 80386, 80486, etc. On the other hand, the MS-DOS operating system was designed to operate on an 8086/8088 microprocessor utilizing only one mode.
As a result, in order to utilize the existing resume processing BIOS present in such computers, a "wrapper" must be created around the BIOS to place the computer into a state upon which the BIOS may perform its resume processing functions. The present invention is designed to perform such functionality.